<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('疫情登记列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>小区名称：</p>
                                <input type="text" name="comName"/>
                            </li>
                            <li>
                                <p>扫码人姓名：</p>
                                <input type="text" name="name"/>
                            </li>
                            <li>
                                <p>手机号：</p>
                                <input type="text" name="phone"/>
                            </li>
                            <li>
                                <p>身份证号：</p>
                                <input type="text" name="pinCode"/>
                            </li>
                            <li>
                                <p>客户类型：</p>
                                <select name="type">
                                    <option value="">所有</option>
                                    <option value="1">业主</option>
                                    <option value="2">家属</option>
                                    <option value="3">租客</option>
                                    <option value="4">其他</option>
                                </select>
                            </li>

                            <li>
                                <p>是否经过新冠肺炎地区：</p>
                                <select name="ncpAreaPass">
                                    <option value="">所有</option>
                                    <option value="0">未经过</option>
                                    <option value="1">经过</option>

                                </select>
                            </li>
                            <li>
                                <p>经过新冠肺炎地区：</p>
                                <input type="text" name="passNcpArea"/>
                            </li>
                            <li>
                                <p>是否接触过新冠肺炎病人：</p>
                                <select name="contactNcpPatient">
                                    <option value="">所有</option>
                                    <option value="0">否</option>
                                    <option value="1">是</option>

                                </select>
                            </li>
                            <li>
                                <p>是否不适：</p>

                                <select name="illness">
                                    <option value="">所有</option>
                                    <option value="0">正常</option>
                                    <option value="1">不适</option>

                                </select>
                            </li>
                            <li>
                                <p>症状：</p>
                                <input type="text" name="symptom"/>
                            </li>
                            <li>
                                <p>进出行为：</p>

                                <select name="inType">
                                    <option value="">所有</option>
                                    <option value="0">进小区</option>
                                    <option value="1">出小区</option>

                                </select>
                            </li>

                            <li class="select-time">
                                <label>进出时间： </label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:owner:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:owner:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:owner:remove')}]];
        var prefix = ctx + "system/owner";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "疫情登记查询",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'id',
                    title : '主键id',
                    visible: false
                },
                {
                    field : 'comId',
                    title : '小区id'
                },
                {
                    field : 'comName',
                    title : '小区名称'
                },
                {
                    field : 'name',
                    title : '扫码人姓名'
                },
                {
                    field : 'phone',
                    title : '手机号'
                },
                {
                    field : 'pinCode',
                    title : '身份证号'
                },
                {
                    field : 'type',
                    title : '客户类型',
                    formatter: function (value) {
                        if (value == '1') {
                            return '业主';
                        } else if (value == '2') {
                            return '家属';
                        }else if (value == '3') {
                            return '租客';
                        }else if (value == '4') {
                            return '其他';
                        }
                    }
                },
                {
                    field : 'buildCode',
                    title : '楼号'
                },
                {
                    field : 'unit',
                    title : '单元'
                },
                {
                    field : 'roomNo',
                    title : '房间号'
                },
                {
                    field : 'ncpAreaPass',
                    title : '是否经过新冠肺炎地区',
                    formatter: function (value) {
                        if (value == '0') {
                            return '未经过';
                        } else if (value == '1') {
                            return '经过';
                        }
                    }
                },
                {
                    field : 'passNcpArea',
                    title : '经过新冠肺炎地区'
                },
                {
                    field : 'contactNcpPatient',
                    title : '是否接触过新冠肺炎病人',
                    formatter: function (value) {
                        if (value == '0') {
                            return '否';
                        } else if (value == '1') {
                            return '是';
                        }
                    }
                },
                {
                    field : 'illness',
                    title : '是否不适',
                    formatter: function (value) {
                        if (value == '0') {
                            return '正常';
                        } else if (value == '1') {
                            return '不适';
                        }
                    }
                },
                {
                    field : 'symptom',
                    title : '症状'
                },
                    {
                        field : 'inType',
                        title : '行为',
                        formatter: function (value) {
                            if (value == '0') {
                                return '进小区';
                            } else if (value == '1') {
                                return '出小区';
                            }
                        }
                    },
                    {
                        field : 'temperature',
                        title : '体温()'
                    },
                    {
                        field : 'accessTime',
                        title : '出入小区时间'
                    },
                    {
                        field : 'remark',
                        title : '其他信息'
                    }
               /* {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }*/]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>
